<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>动物详情</title>
<link rel="stylesheet" href="../css/reset1.css">
<link rel="stylesheet" href="../css/index.css">

<link rel="stylesheet" href="../css/bootstrap.min.css" />
<link rel="stylesheet" href="../css/style3.css" />
<script src="../js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js" ></script>
<script type="text/javascript" src="../js/indexseo.js" ></script>
<script src="../js/slider.js"></script>
<script src="../js/navChange.js"></script>
<script type="text/javascript" src="../js/jquery.validate.js"></script>
<script type="text/javascript" src="../js/messages_zh.js" ></script>

<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.cookie.js"></script>
<script type="text/javascript">
var E3MALL = {
		checkLogin : function(){
			var _ticket = $.cookie("token");
			if(!_ticket){
				return ;
			}
			$.ajax({
				url : "${pageContext.request.contextPath }/user/token/" + _ticket,
				//dataType : "jsonp",
				type : "GET",
				success : function(data){
					if(data.status == 200){
						var username = data.data.username;
						/* alert("hello"+username); */
						/* var html = username + "，欢迎您！<a href=\"http://www.e3mall.cn/user/logout.html\" class=\"link-logout\">[退出]</a>"; */
						var html = "<div class='navbar-right' style='display: inline-block;padding-top: 10px;'>"+
				          "<div class=''>"+
				          	"<ol class='list-inline'>"+
				          		"<li>欢迎您,<font style='color: red;'>"+username+"</font></li>|"+
				          		"<li><a href='${pageContext.request.contextPath}/user/logout/"+_ticket+"' class='link-logout'>[退出]</a></li>"+
				          	"</ol>"+
				          "</div>"+
				          "</div>";
						$("#loginbar").html(html);
					}
				}
			});
		}
	}

	$(function(){
		// 查看是否已经登录，如果已经登录查询登录信息
		E3MALL.checkLogin();
	});
</script>
<style>	
  /* Make the image fully responsive */
.carousel-inner img {
     width: 100%;
     height: 100%;
}
</style>
<script type="text/javascript">
	
        $.validator.addMethod("isPhone", function(value, element) {
          var length = value.length;
          var mobile = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
          return this.optional(element) || (length == 11 && mobile.test(value));
         }, "请填写正确的手机号码");
         /*表单校验*/
	$(function () {
				$("#adoptForm").validate({
					rules:{
						adoptman:{
							required:true,
							minlength:6,
							/*username:true*/
						},
						adopttel:{
							isPhone:true
						},
						adoptemail:{
							email:true
						}
					},
					messages:{
						adoptman:{
							required:"必填字段",
							minlength:"不能少于6个字段",
							/*username:"用户名已存在"*/
						},
						adopttel:{
							isPhone:"请填写正确的手机号码"
						},
						adoptemail:{
							email:"请输入正确的邮箱格式"
						}
					}
				});
			});
	
</script>
</head>
<body style="overflow-x:hidden;padding-bottom: 50px;">

	<jsp:include page="/WEB-INF/jsp/head.jsp"></jsp:include>
		
		<!--新闻标题列表-->
		<div class="container">
			<div class="col-lg-2">
				
			</div>
			
			<div class="col-lg-8 col-lg-offset-2" style="border: 1px solid #E7E7E7;background-color: antiquewhite;padding-top: 5px;">
				<div class="row">
					<!--标题-->
					<h4>详情:</h4>
					<div class="col-lg-8" style="background-color: antiquewhite; padding-top: 5px;padding-bottom: 20px;">
						
						<!--收养表单-->
						<form class="form-horizontal" role="form" id="adoptForm" action="" method="post">
							
							<div class="form-group" style="padding-bottom: 1px;">
								<label class="col-sm-2 control-label">品种:</label>
								<div class="col-sm-10">
									<p class="form-control-static">其他</p>
									<!--宠物名称-->
									<input type="hidden" id="adoptname" name="adoptname" value="" />
									<!--图片-->
									<input type="hidden" id="adpotimage" name="adpotimage" value="" />
									<!--动物编号-->
									<input type="hidden" id="adoptnum" name="adoptnum" value="" />
									
								</div>
								<div style="clear:both;"><hr style="background-color: #111111;height: 1px;"/></div>
							</div>
							
							<div class="form-group" style="padding-top: 0px;">
								<label class="col-sm-2 control-label">性别:</label>
								<div class="col-sm-10">
									<p class="form-control-static">男</p>
								</div>
								<div style="clear:both;"><hr style="background-color: #111111;height: 1px;"/></div>
							</div>
							
							<div class="form-group" style="padding-bottom: 1px;">
								<label class="col-sm-2 control-label">年龄:</label>
								<div class="col-sm-10">
									<p class="form-control-static">6个月</p>
								</div>
								<div style="clear:both;"><hr style="background-color: #111111;height: 1px;"/></div>
							</div>
							
							<div class="form-group" style="padding-bottom: 1px;">
								<label class="col-sm-2 control-label">体重:</label>
								<div class="col-sm-10">
									<p class="form-control-static">6kg</p>
								</div>
								<div style="clear:both;"><hr style="background-color: #111111;height: 1px;"/></div>
							</div>
							
							<div class="form-group" style="padding-bottom: 1px;">
								<label class="col-sm-2 control-label">动物编号:</label>
								<div class="col-sm-10">
									<p class="form-control-static">95648552</p>
								</div>
								<div style="clear:both;"><hr style="background-color: #111111;height: 1px;"/></div>
							</div>

							<!--<span><hr style="background-color: #111111;height: 1px;"/></span>-->
							<div class="form-group" style="padding-bottom: 0px;">
								<label class="col-sm-2 control-label">联系人:</label>
								<div class="col-sm-10">
									<p class="form-control-static"><input type="text" id="adoptman" name="adoptman" style="border: 1px solid black;"/></p>
								</div>
							</div>
							
							<div class="form-group" style="padding-bottom: 0px;">
								<label class="col-sm-2 control-label">联系方式:</label>
								<div class="col-sm-10">
									<p class="form-control-static"><input type="text" id="adopttel" name="adopttel" style="border: 1px solid black;"/></p>
								</div>
							</div>
							
							<div class="form-group" style="padding-bottom: 0px;">
								<label class="col-sm-2 control-label">邮箱:</label>
								<div class="col-sm-10">
									<p class="form-control-static"><input type="text" id="adoptemail" name="adoptemail" style="border: 1px solid black;"/></p>
								</div>
							</div>
							
							<div class="form-group" style="padding-bottom: 0px;">
								<div class="col-sm-4 col-sm-offset-3">
										<button type="submit" class="btn btn-primary">确定收养</button>
								</div>
							</div>
						</form>
					</div>
					
					<!--图片,名字-->
					<div class="col-lg-4" style="background-color: antiquewhite;text-align:center; padding-top: 5px;padding-bottom: 20px;">
						<span>
							<div style="background: black; padding: 0px;" class="img-thumbnail">
								<img class="img-responsive img-rounded" style="height: 200px;width: 200px;" src="../images/rabit.jpg">
								<font style="color: #21A9E7;font-size: xx-large;">little</font>
						</div>
						</span>
					</div>
					
				</div>
				

		</div>

		<!--底层-->
		<nav class="navbar-fixed-bottom">
			<header class="header" style="background-color: gainsboro;">
		      <div class="container1">
		      	
		        <ul class="nav" style="padding-top: 5px;">
		          <li class="nav" style="display: inline;">
		            <p>CopyRight@201624131105</p>
		          </li>
		        </ul>
		        
		      </div>
		    </header>
		    </nav>
</body>
</html>
